

struct PriceInfo {
  double LastPrice;

}

unordered_map<string, PriceInfo>
    md_buffer;

void CMdSpi2::OnQuoteUpdated(EESMarketDepthQuoteData *pDepthQuoteData) {
  string another_ticker;
  if (strcmp(DepthQuoteData->InstrumentID, ticker1)) {
    another_ticker = string(ticker1);
  } else {
    another_ticker = string(ticker2);
  }
  string curr_key = string(DepthQuoteData->InstrumentID) +
                    string(pDepthQuoteData->UpdateTime);  // or string(xxx , 9)
  string another_key =
      another_ticker +
      string(pDepthQuoteData->UpdateTime);  // or string(xxx , 9)
  if (md_buffer.find(another_key) != md_buffer.end()) {
    // do price calculate  and erase another_key;

    auto itr = md_buffer.find(another_key);
    md_buffer.erase(itr);

  } else {
    PriceInfo info;
    md_buffer.insert{curr_key, info};
  }
}